# coding: utf-8

import re

input_file = open("D:\\programing\\code\\python\\HTTP_Service\\src\\mime.txt")
output_file = open('D:\\programing\\code\\python\\HTTP_Service\\src\\mime.dic', 'w')

for line in input_file:
    m = re.match(u'.(\S+)\s+(\S+)', line)
    
    ext ,mime = m.group(1, 2)
        
    output_file.write('"'+ ext +'": "' + mime +'", \\\n')
        
output_file.close()


#from time import ctime, sleep
#print "start " + ctime()
#print self.responseHandler(self.requestToResponseAttrHandler(data))
#sleep(10)
#print "end " + ctime()
